package com.uzhie.jt808.client;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.timeout.IdleStateHandler;

import java.util.concurrent.TimeUnit;

/**
 * Created by TangFei on 2018/8/29.
 */
public class ClientFilter extends ChannelInitializer<SocketChannel> {

    @Override
    protected void initChannel(SocketChannel socketChannel) throws Exception {
        socketChannel.pipeline().addLast(new IdleStateHandler(0,4,0, TimeUnit.SECONDS));
//        socketChannel.pipeline().addLast(new OutHandler());
        socketChannel.pipeline().addLast(new InHandler());
    }

}
